<nz-breadcrumb>
    <nz-breadcrumb-item>
        <a (click)="goback()">返回</a>
    </nz-breadcrumb-item>
    <nz-breadcrumb-item>新建 issue</nz-breadcrumb-item>
</nz-breadcrumb>


<form style="margin: 10px 0 0 0;" nz-form [formGroup]="validateForm" (ngSubmit)="submitForm()">
    <nz-form-item>
        <nz-form-label [nzSpan]="3" nzRequired nzFor="kind">类别</nz-form-label>
        <nz-form-control>
            <nz-radio-group formControlName="kind" id="kind">
                <label nz-radio nzValue="Enterprises">企业</label>
                <label nz-radio nzValue="Repo">仓库</label>
            </nz-radio-group>
        </nz-form-control>
    </nz-form-item>
    <nz-form-item *ngIf="validateForm.value['kind']=='Enterprises'">
        <nz-form-label nzRequired [nzSpan]="3" nzFor="program">项目</nz-form-label>
        <nz-form-control>
            <nz-select formControlName="program" id="program">
                <nz-option nzValue="335394" nzLabel="宁波种业"></nz-option>
                <nz-option nzValue="335392" nzLabel="宁波微萌"></nz-option>
                <nz-option nzValue="376610" nzLabel="技术变现"></nz-option>
            </nz-select>
        </nz-form-control>
    </nz-form-item>
    <nz-form-item *ngIf="validateForm.value['kind']=='Repo'">
        <nz-form-label nzRequired [nzSpan]=" 3" nzFor="repo">仓库</nz-form-label>
        <nz-form-control>
            <input nz-input formControlName="repo" id="repo" placeholder="仓库名称" readonly />
        </nz-form-control>
    </nz-form-item>
    <nz-form-item>
        <nz-form-label [nzSpan]="3" nzRequired nzFor="title">标题</nz-form-label>
        <nz-form-control nzErrorTip="必填项且长度至少为4">
            <input nz-input formControlName="title" id="title" placeholder="请概括您的问题" />
        </nz-form-control>
    </nz-form-item>
    <nz-form-item>
        <nz-form-label [nzSpan]="3" nzRequired nzFor="body">内容</nz-form-label>
        <nz-form-control nzErrorTip="必填项且长度至少为10">
            <textarea nz-input id="body" formControlName="body" placeholder="请描述您的问题"
                [nzAutosize]="{ minRows: 5 }"></textarea>
        </nz-form-control>
    </nz-form-item>

    <nz-form-item nz-row>
        <nz-form-control [nzSpan]="24" class="buttons">
            <button nz-button nzType="primary">提交</button>
        </nz-form-control>
    </nz-form-item>
</form>